package model

import "gorm.io/gorm"

type ProblemCategory struct {
	gorm.Model
	ProblemID  uint      `gorm:"column:problem_id" json:"problem_id"`
	CategoryID uint      `gorm:"column:category_id" json:"category_id"`
	Problem    *Problem  `gorm:"foreignKey:ProblemID;references:ID"`
	Category   *Category `gorm:"foreignKey:CategoryID;references:ID"`
}

func (table *ProblemCategory) TableName() string {
	return "problem_category"
}
